package my.base.test.junit.runners;

import java.util.Comparator;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.runner.Description;
import org.junit.runner.manipulation.Sorter;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.InitializationError;

public class MyCustomRunner extends BlockJUnit4ClassRunner {
	private static final Log logger = LogFactory.getLog(MyCustomRunner.class);

	public MyCustomRunner(Class<?> klass) throws InitializationError {
		super(klass);
		this.sort(new Sorter(new Comparator<Description>() {
			public int compare(Description o1, Description o2) {
				return 1;
			}
		}));
		logger.info("MyCustomRunner " + klass);
	}

}
